Hi,
I’ve painted myself into a corner with ValidIf
My app uses the concept of current and planned cable routes / branches.
Current branches should always show in the survey form.
Current branch = [survey_branch_number]
Planned branches should only show in survey form when added via a LINKTOFORM action.
Planned branch = [branch_A_number] & [branch_B_number]
LINKTOFORM(
"survey_Form",
"lcs", [lcs],
"select_cabinet_to_survey", [select_cabinet_to_survey],
"select_asset_type", [select_asset_type],
"asset_name", [branch_A_assets],
"survey_branch_number", [branch_A_number],
)
SORT(
UNIQUE(
SELECT(survey[survey_branch_number], TRUE, TRUE), {1,2}
+SELECT(survey[branch_A_number], TRUE, TRUE) {2,3,4}
+SELECT(survey[branch_B_number], TRUE, TRUE) {5}
-LIST(0)
-LIST("")
)
)
SORT(
UNIQUE(
INTERSECT(
SELECT(survey[survey_branch_number], TRUE, TRUE), {1,2}
SELECT(survey[survey_branch_number], TRUE, TRUE) {1,2}
+SELECT(survey[branch_A_number], TRUE, TRUE) {2,3,4}
+SELECT(survey[branch_B_number], TRUE, TRUE) {5}
-LIST(0)
-LIST("")
)
)
)
I hope that made sense?
Thanks in advance…
.
.
.
survey table
.
.
.
survey form
Solved! Go to Solution.
If I have understood your requirement correctly, you may try following
You may create another “survey_Form” form view (Ref type) called say “surevy_Form_Action” by copying the existing survey_Form.
You may navigate tho this copied “survey_Form_Action” through LINKTOFORM() action.
LINKTOFORM(
"survey_Form_Action",
“lcs”, [lcs],
"select_cabinet_to_survey
…
…
)
In valid_if you may have an expression something like below
IFS(
CONTEXT(“View”)= “survey_Form”, LIST(1,2),
CONTEXT(“View”)= “survey_Form_Action”, LIST(1,2,3,4,5,6)
)
Of course you may need to include suitable expressions for LIST(1,2) and LIST(1,2,3,4,5,6), but the idea is vary the valid_if expression and list based on form view and use two forms -one for action and the other for normal use.
Actual implementation will depend on how your app is structured and other business logic. So please evlauate it.
If I have understood your requirement correctly, you may try following
You may create another “survey_Form” form view (Ref type) called say “surevy_Form_Action” by copying the existing survey_Form.
You may navigate tho this copied “survey_Form_Action” through LINKTOFORM() action.
LINKTOFORM(
"survey_Form_Action",
“lcs”, [lcs],
"select_cabinet_to_survey
…
…
)
In valid_if you may have an expression something like below
IFS(
CONTEXT(“View”)= “survey_Form”, LIST(1,2),
CONTEXT(“View”)= “survey_Form_Action”, LIST(1,2,3,4,5,6)
)
Of course you may need to include suitable expressions for LIST(1,2) and LIST(1,2,3,4,5,6), but the idea is vary the valid_if expression and list based on form view and use two forms -one for action and the other for normal use.
Actual implementation will depend on how your app is structured and other business logic. So please evlauate it.
Hello again @Suvrutt_Gurjar,
An excellent suggestion and I can see exactly how that’s going to work. I’ll get on with implementing that and will report back. Thanks a million…
Good to know that the suggested approach can be useful. Please do evaluate it well as your app in general seems to be substantially large.
I may also suggest you to evaluate to simplify the above expression. It seems to create a big list by including SELECT(survey[survey_branch_number], TRUE, TRUE) in that big list and through intersecting again by SELECT(survey[survey_branch_number], TRUE, TRUE) it seems to get back to list comprised by expression SELECT(survey[survey_branch_number], TRUE, TRUE)
So you may wish to eveluate why not use just SELECT(survey[survey_branch_number], TRUE, TRUE) to start with instead of first creating a big list and then again truncating it through same means?
Hi @Suvrutt_Gurjar,
Thanks for that tip. Now that I have your other suggestion I will be able to simplify the above too.
Cheers…
Curvy Gyals is a body shapewear brand that is dedicated to empowering women of all shapes and sizes to feel confident and comfortable in their own skin. The brand offers a wide variety of shapewear products, including waist trainers, body shapers, fajas, and buttock lifters. Curvy Gyals shapewear is made with high-quality materials and construction, and it is designed to provide maximum compression and support. The brand also offers custom shapewear, so you can be sure to find the perfect fit for your body.
A note for users of XY Map:
Whilst the above solution worked perfectly - I did have some XY Map related issues.
I found that the new form (Survey_Form_action) had hijacked the existing form (Survey_Form) on my ‘Survey View’.
The solution to this was:
Hijack situation over!
User | Count |
---|---|
43 | |
26 | |
24 | |
14 | |
12 |