Select to view content in your preferred language

If Statement Dependency Cycle

651
3
Jump to solution
11-13-2023 01:15 AM
Cyprus_Forest_Department
Regular Contributor

Hi I m running to a dependency cycle following an if statmenet logic.

Maybe someone has an idea of how I can skip this?

I have a feature layer that has a field named "DFCode".

The layer contains several entries with the "DFCode" populated on each.

The survey form will have inbox enabled.

So I want the form to call and populate the "DFCode" field with the value in the feature layer (if it exists) or have the user calculate it via the form.

I have manage to do each of the statements seperately but not both.

Thanks for your time.

0 Kudos
2 Solutions

Accepted Solutions
IsmaelChivite
Esri Notable Contributor

Would this work? See below:

IsmaelChivite_0-1699908701884.png

If the dfcode exists in the inbox record, it will be populated. Otherwise, the user needs to enter it (required question) using the numbers appearance. The input mask is set to make sure the user-entered 3 digit number has F for prefix.

View solution in original post

0 Kudos
Cyprus_Forest_Department
Regular Contributor

Thank you both gentlemen for the swift replies. The approach from @IsmaelChivite suited best to my case. It was simpler than I imagined.

View solution in original post

3 Replies
DougBrowning
MVP Esteemed Contributor

Usually use the 3 fields trick here.  One to calc from the layer, one to calc inside the form, and the third field to pick which one to use.  You can set the bind esri to null on the first two fields so that they do not show up in the backend data.

Hope that makes sense

IsmaelChivite
Esri Notable Contributor

Would this work? See below:

IsmaelChivite_0-1699908701884.png

If the dfcode exists in the inbox record, it will be populated. Otherwise, the user needs to enter it (required question) using the numbers appearance. The input mask is set to make sure the user-entered 3 digit number has F for prefix.

0 Kudos
Cyprus_Forest_Department
Regular Contributor

Thank you both gentlemen for the swift replies. The approach from @IsmaelChivite suited best to my case. It was simpler than I imagined.