Hello Everyone,
Today, I want to show you how to store to list of things in repeating group (API) value with just one click. Demo Video
Requirements:
1- You should add Toolbox plugin in you bubble app for Javascript
2- You need some data coming from API ( I try contetful asset API)
3- Check the expose the option to add an ID attribute to HTML elements
Step 1: Create a Data type in bubble data tab for store the values coming from API.
I need to know just 3 fields (File_name, fileURL, SysID)
2. Click on Repeating Group
3. Drag highlighted element
4. Click on Get data from an external API
5. Click on highlight
6. Type “assets”
7. Click on API Contentfull - API GetAllAssetOfMaster
8. Click on Close
9. Click on 's items
10. Type “file”
11. Click on :filtered
12. Click on Add a new constraint
13. Click on highlight
14. Click on sys id
15. Click on highlight
16. Click on isn’t in
17. Click on Do a search for
18. Click on highlight
19. Type “assets”
20. Click on Contentful_Assets
21. Click on Close
22. Type “sys”
23. Click on :each item’s Sys_id
24. Click on Close
25. Click on Text
26. Drag highlighted element
27. Click on Insert dynamic data
28. Click on Current cell’s API GetAllAssetOfSingleStep item
29. Type “file”
30. Click on 's fields file fileName
31. Click on Button
32. Drag highlighted element
33. Type “Add”
34. Click on ID Attribute
35. Type “addAssets”
36. Click on Start/Edit workflow
37. Click on Workflow
38. Click on Click here to add an action…
39. Click on Create a new thing…
40. Click on highlight
41. Type “assets”
42. Click on Contentful_Assets
43. Click on Set another field
44. Click on File_name
45. Click on Set another field
46. Click on FileURL
47. Click on Sys_id
48. Click on Current cell’s API GetAllAssetOfSingleStep item
49. Type “file”
50. Click on 's fields file fileName
51. Click on Current cell’s API GetAllAssetOfSingleStep item
52. Type “url”
53. Click on 's fields file url
54. Click on Current cell’s API GetAllAssetOfSingleStep item
55. Type “sys”
56. Click on 's sys id
57. Click on Design
58. Click on Button
59. Drag highlighted element
60. Type “Add All Item”
61. Click on Start/Edit workflow
62. Click on Workflow
63. Click on Click here to add an action…
64. Type "run "
65. Click on Run javascript
66. Paste Below Code into text area
window.setInterval(function(){
document.getElementById("addAssets").click();
}, 1000);
// You can change the ID name ( 1000 is click the button every a second )
67. Click on Preview
68. Click on Add All Item
69. Click on Add
My personal web site: iamenes.com