Skip to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Creating an IF/Loop Script...??

Featured Replies

Im not quite sure what i need here, so i will do my best to explain...

I have my main table layout with two portals.

One is a portal to a skills table (Skills) with a list of all skills, each with a unique ID (SkillsID)

The other is a table that skills are copied to (Skills List). the skills are copied entirely to this table but not deleted from the 'Skills' table (so multiple copies if the same record can be copied accross.

In the Skills List table there is a field called "Rank"

I have a button in the Skills portal that when pressed will copy that record accross, but at the moment it will make each multiple a new and separate record, so if two copies of one record are moved, they will be separate records.

I need a script that when the button is pressed the script will look through all the entries in the "skills List' table. If the current skill ID isn't found, i need it to create a new portal row,

If it does exist i need it to add +1 to the ranks field of the existing record with the correct ID.

I have tried IF and Loop scripts and combinations of both but any loop script gets stuck, and If statements only work off one record, and doesn't cycle.

Hope this explanation is clear... i will post an example tomorrow...

It sounds like you have a many to many relationship with your main table and the Skills table. The Skills List table should be the join file. So you should have a retaionship between Main and Skill List and another one between Skills and Skill List. In main have a portal which shows the data from Skill List and Skills. Skill List needs the fields Main ID, Skill ID & Rank. All details about skills are in the Skills table.

I would make a value list based on Skill ID and Skill Name in the main table using data from the Skills table. I would use this to make a pop up list in the Skill ID field in the portal. Someplace on the layout I would have a button to add new skill. This would take the user to the Skills layout and call a script to create a new record. A button on this layout would return you to main layout.

  • Author

I Have all the tables in relationships as you said...

Here is an example...

I couldn't attatch the whole file as it is too big, so i just did the part needed for this question.

Test Skills.zip

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.