cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
amel0410
Frequent Visitor

pass data from gallery to another screen

Dear guys

 

please help me to find solution for my issue here.

I have fields form a screen that should be filled after find and get item from search screen.

for the example field named "branch", when user click icon search it will navigate to screen Search Branch.

but I don't know how to pass the data from search branch into field "branch".

 

When I used function in default "branch" as follows:

 

If(Generalinfoform_1.Mode = FormMode.New, Concatenate(branchID.Text," ",branchname.Text),varformode.branch)

 

where varformode I used in item "Generalinfoform_1"

 

it happen for new form mode:  

the field "branch" will be filled by "branchID branchname" appropriate with I want

 

but for edit form mode

I can't edit it, even though I have cleared the field before I click icon search again.     

 

what i want here, I can't pass the data from search branch for both new or edit mode.

 

please help me, I've been days struggle with this issue.

  

6 REPLIES 6
Waegemma
Super User
Super User

Hi @amel0410 ,

 

Could be I'm missing something:

Instead of using a separate search screen, wouldn't it be easier to use a combobox, with search allowed? You can acces the BranchName and BranchID with the properties shown below, just set the ComboBox 'Items' to the list you use.

 

combo.png

 

Marc

thanks for your feedback.

but the problem is the data source for combo box is too big.

The field branch is only an example. I have 1 more field that used more than 80,000 records. that's why I used search screen.  any another option?

 

Waegemma
Super User
Super User

Busy at the moment, but quick thought:

 

You could pass the chosen branch back from the search via a global variable, set the Default on the form If(IsBlank(globalvariable),ThisItem.Branch,globalvariable) and blank the global variable each time you open a form.

That way in Edit the form shows the Branch that was present, but replaces it with globalvariable if you search, in a New Form the same applies

As I say: very quick thought, I'll have a better look later.

 

Marc

thanks for your option solution, but I'm confused don't know how to use it.. sorry for my foolishness, I'm very newbie in power apps and my background is not an IT person.. 😞  Could you please explain more how I use it? thanks in advance for your kindness.. 🙂

 

Waegemma
Super User
Super User

Hi @amel0410 ,

 

Rereading you post a couple of times, I noticed you use varformode.branch while you mean Thisitem.branch, could you try setting Default to:

If(Generalinfoform_1.Mode = FormMode.New, Concatenate(branchID.Text," ",branchname.Text),ThisItem.branch)

?

 

Marc

 

 

 

 

Waegemma
Super User
Super User

Hi @amel0410 ,

 

You wrote:

 

"When I used function in default "branch" as follows:

 

If(Generalinfoform_1.Mode = FormMode.New, Concatenate(branchID.Text," ",branchname.Text),varformode.branch)"

 

could you replace that formula with:

 

If(Generalinfoform_1.Mode = FormMode.New, Concatenate(branchID.Text," ",branchname.Text),ThisItem.branch)

 

Marc

Helpful resources

Announcements
Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on August 17, 2022 at 8am PDT.

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Users online (3,218)